package com.devsoft.foodfrenzy;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.sprite.Sprite;
import org.andengine.opengl.util.GLState;

import com.devsoft.foodfrenzy.SceneManager.SceneType;
import com.devsoft.foodfrenzy.BaseScene;

public class SplashScene extends BaseScene
{
	private Sprite splash;
	
	
	@Override
    public void createScene()
    {
    	splash = new Sprite(0, 0, resourcesManager.splash_region, vbom)
    	
    	{
    	    @Override
    	    protected void preDraw(GLState pGLState, Camera pCamera)	//probably wont need dither
    	    {
    	       super.preDraw(pGLState, pCamera);
    	       pGLState.enableDither();
    	       
    	    }
    	    
    	};        
    	splash.setPosition(400, 240);	//attaches to center of screen
    	attachChild(splash);

    }
	

    @Override
    public void onBackKeyPressed()
    {

    }
    

    @Override
    public SceneType getSceneType()
    {
    	return SceneType.SCENE_SPLASH;

    }
    

    @Override
    public void disposeScene()
    {
    	splash.detachSelf();
        splash.dispose();
        this.detachSelf();
        this.dispose();

    }
    
}